package com.winona.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.taplinker.client.R;
import com.winona.Base1Activity;
import com.winona.HomeActivity;

public class AcademicCenterActivity extends Base1Activity {
	private TextView title;
	private ImageView back;
	private Intent intent;
	private View papers, activity, room, edicine;

	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.academic);
		findView();
		title.setText("学术中心");
		setLinstener();
	}

	private void setLinstener() {
		back.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				intent = getIntent();
				String value = intent.getExtras().getString("academic");
				if (value.equals("0")) {
					openMenu();
				} else {
					intent = new Intent(AcademicCenterActivity.this,
							HomeActivity.class);
					startActivity(intent);
					overridePendingTransition(R.anim.input, R.anim.out);
				}
			}
		});
		// 学术论文
		papers.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {

				startActivity(PapersActivity.class);
			}
		});
		// 学术活动
		activity.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(AcademicActivitiesActivity.class);
			}
		});
		// 专家讲堂
		room.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {

				startActivity(ExpertLectureActivity.class);
			}
		});
		// 医学美容
		edicine.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(MedicalCosmetologyActivity.class);
			}
		});

	}

	private void findView() {
		title = (TextView) findViewById(R.id.academic_title);
		back = (ImageView) findViewById(R.id.academic_back);
		papers = findViewById(R.id.academic_papers_name);
		activity = findViewById(R.id.academic_activity);
		room = findViewById(R.id.academic_room);
		edicine = findViewById(R.id.academic_edicine);

	}
}
